package com.foreveross.taskservice.application.task.mq;

import com.foreveross.taskservice.common.CacheDataSpace;

/**
 * 获取MQinfo
 * @author Administrator
 *
 */
public interface IMQInfoApplication {
	/**
	 * 获得一个brokerMBean
	 * @return
	 * @throws Exception
	 */
	public org.apache.activemq.broker.jmx.BrokerViewMBean getBrokerViewMBean()throws Exception;
	
	/**
	 * 根据数据空间和渠道获取任务队列mBean
	 * 如果没有改队列返回null
	 * @param space
	 * @param channelId
	 * @return
	 */
	public org.apache.activemq.broker.jmx.QueueViewMBean getTaskQueueViewMBean(CacheDataSpace space,String channelId)throws Exception;
	/**
	 * 根据数据空间获得回滚队列mBean
	 * 如果没有改队列返回null
	 * @param space
	 * @return
	 * @throws Exception
	 */
	public org.apache.activemq.broker.jmx.QueueViewMBean getRollQueueViewMBean(CacheDataSpace space)throws Exception;
	
	
	/**
	 * 根据数据空间和渠道返回队列的长度
	 * 如果没有该队列则返回0
	 * @param space
	 * @param channelId
	 * @return
	 * @throws Exception
	 */
	public long getTaskQueueSize(CacheDataSpace space,String channelId)throws Exception;
	/**
	 * 根据数据空间和渠道返回回滚队列的长度
	 * 如果没有该队列则返回0
	 * @param space
	 * @param channelId
	 * @return
	 * @throws Exception
	 */
	public long getRollQueueSize(CacheDataSpace space)throws Exception;
	
}
